/*
 * envelop_i2c_28335.h
 *
 *  Created on: 2013-7-2
 *      Author: dylan
 */

#ifndef ENVELOP_I2C_28335_H_
#define ENVELOP_I2C_28335_H_


void i2c_init( const unsigned short& prescale=9,const unsigned short& iccl=10,const unsigned short& icch=5 );

unsigned short i2c_sendTo( const unsigned short& slave,const unsigned short* buf,const unsigned short& len );
unsigned short i2c_recvFrom( const unsigned short& slave,const unsigned short& len );

void i2c_clearIntrupt();

unsigned short i2c_ifSendOk();
unsigned short i2c_ifRecvOk( unsigned short* buf,const unsigned short& len );

void i2c_reset();

unsigned short i2c_status();

#endif /* ENVELOP_I2C_28335_H_ */
